package com.kgdev.cweb.entities.pub;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.kgdev.cweb.entities.ManagedEntity;

/**
 * The persistent class for the pub_plate_pkg database table.
 * 
 */
@Entity
@NamedQueries(value = {
		@NamedQuery(name = "PlatePacking.findAll", query = "select p from PlatePacking p")})
@Table(name = "pub_plate_pkg")
public class PlatePacking implements Serializable, ManagedEntity {
	private static final long serialVersionUID = 1L;

	@Id
	@TableGenerator(name = "PUB_PLATE_PKG", allocationSize = 1, initialValue = 1, table = "SEQUENCE", valueColumnName = "SEQ_COUNT", pkColumnName = "SEQ_NAME", pkColumnValue = "PUB_PLATE_PKG")
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "PUB_PLATE_PKG")
	@Column(name = "packing_id", unique = true, nullable = false)
	private Integer packingId;

	@Column(name = "is_available", nullable = false)
	private Boolean isAvailable;

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((packingId == null) ? 0 : packingId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		PlatePacking other = (PlatePacking) obj;
		if (packingId == null) {
			if (other.packingId != null)
				return false;
		} else if (!packingId.equals(other.packingId))
			return false;
		return true;
	}

	@Column(name = "packing_type", nullable = false, length = 45)
	private String packingType;

	public PlatePacking() {
	}

	public Integer getPackingId() {
		return this.packingId;
	}

	public void setPackingId(Integer packingId) {
		this.packingId = packingId;
	}

	public Boolean getIsAvailable() {
		return this.isAvailable;
	}

	public void setIsAvailable(Boolean isAvailable) {
		this.isAvailable = isAvailable;
	}

	public String getPackingType() {
		return this.packingType;
	}

	public void setPackingType(String packingType) {
		this.packingType = packingType;
	}

}